package com.zbf.设计模式1.装饰模式;

/**
 * @author: LI-CI-GAO
 * 作者: licigao
 * 日期: 2021/8/23  10:33
 * 描述:
 */
public class TestZhuanshi11 {

    public static void main(String[] args) {

        MQiang1 mQiang1=new MQiang1();
        mQiang1.shout();
        System.out.println("========机关枪玩一会=======");
        LQiang1 lQiang=new LQiang1(mQiang1);
        lQiang.shout();
        System.out.println("=======变成了激光机关枪");
        SQiang1 sQiang1=new SQiang1(lQiang);
        sQiang1.shout();
        System.out.println("=======变成了激光散弹机关枪");


        LQiang1 qiang1 = (LQiang1) sQiang1.getQiang1();
        Qiang1 qiang11 = qiang1.getQiang1();


        System.out.println("=========================");
        qiang11.shout();
        System.out.println();




    }

}
